package com.sun.web.utils;

import javax.crypto.SecretKey;

public class ApplicationContext {
	private static ApplicationContext ac;
	private static String secretKeyString = "HFQAjepI7q8QAJWnqSg/jA==";
	
	private ApplicationContext(){
		//不能在构造方法中调用genKey()方法，最终还是会导致key不同
		
	}
	
	synchronized public static ApplicationContext getInstance(){
		if (ac == null){
			ac = new ApplicationContext();
		}
		return ac;
	}
	
	public static String getSecretKeyString() throws Exception{
		return secretKeyString;
	}
}
